import {createRouter,createWebHistory} from 'vue-router'


// 定义路由
const routes = [
    {
        path:'/',
        component: () => import('../views/Main.vue'),
        children:[
            {
                path:'/',
                name:'home',
                component:()=>import('../views/home/Home.vue')
            },
            {
                path:'/user',
                name:'user',
                component:()=>import('../views/user/User.vue')
            },
            {
                path:'/page1',
                name:'page1',
                component:()=>import('../views/pageone/PageOne.vue')
            },
        ]
    }
]

const router = createRouter({
    history:createWebHistory(),
    routes
})


export default router